package cn.com.thinvent.dispatch.dao;

import cn.com.thinvent.dispatch.dao.base.BaseMapper;
import cn.com.thinvent.dispatch.entity.ModelDatasourceMapping;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ModelDatasourceMappingMapper extends BaseMapper<ModelDatasourceMapping> {

    void deleteByTaskId(@Param("taskId") Integer taskId);

    List<ModelDatasourceMapping> queryAllByLimit(@Param("taskId") Integer taskId, @Param("pageNum") Integer pageNum,
                                                 @Param("pageSize") Integer pageSize);

    Long count(@Param("taskId") Integer taskId);

    List<ModelDatasourceMapping> queryByTaskId(@Param("taskId") Integer taskId);

    List<ModelDatasourceMapping> queryByTaskIdUn(@Param("taskId") Integer taskId);

    List<ModelDatasourceMapping> queryListByTaskId(@Param("taskId") Integer taskId);
}
